@import "../dropdown_picker";

@import "./apl_helpers";

.apl-rotation-picker-root {
	.apl-list-item-picker, .apl-prepull-action-picker {
		flex-wrap: wrap;
		align-items: flex-start !important;

		.list-picker-title {
			border: 0;
			margin: 0;
		}

		&> .list-picker-new-button {
			width: 12rem;
			margin: 0;
		}

		>* > .list-picker-item-container {
			background-color: rgba(21, 23, 30, 0.8);
			border: 1px solid var(--bs-primary) !important;
			padding: map-get($spacers, 2);
			margin-bottom: map-get($spacers, 2);

			.list-picker-item-header {
				align-items: flex-start;
			}

			&>.list-picker-item {
				flex-grow: 1;
			}
		}

		.form-label {
			margin-right: map-get($spacers, 2);
			margin-bottom: 0;
		}
	}

	.apl-prepull-action-picker {
		.list-picker-item-container {
			align-items: center;
		}
	}

	.apl-list-item-picker .apl-prepull-actions-only,
	.apl-prepull-action-picker .apl-priority-list-only {
		display: none;
	}

	.adaptive-string-picker-root > input {
		text-align: center;
	}

	.apl-prepull-actions-doat {
		width: unset;
		margin: 0;
	}
}

.apl-list-item-picker-root {
	display: flex;
	align-items: center;
	flex-direction: row;
	margin: 0;

	&> :not(:last-child) {
		margin-right: map-get($spacers, 2);
	}

	.form-label {
		font-size: $btn-font-size;
		line-height: 1.5;
	}

	.form-control {
		padding: calc($input-padding-y / 2) calc($input-padding-x / 2);
	}

	.number-picker-root {
		flex-direction: row;
	}

	.dropdown-picker-button {
		padding: 0;
		border: 0;
	}

	.dropdown-menu {
		background-color: $table-row-odd-bg;
	}
}

.apl-action-picker-root, .apl-value-picker-root {
	flex-direction: row;
	margin: 0;

	.apl-action-condition {
		margin-bottom: map-get($spacers, 2) !important;
	}

	.input-root {
		margin: 0;
		width: auto;
		border: none;

		&:not(:last-child) {
			margin-right: map-get($spacers, 2);
		}
	}

	.list-picker-new-button {
		width: unset;
		font-size: $content-font-size;
		line-height: 1.5rem;
	}
}

.apl-list-item-picker-root > .apl-action-picker-root {
	flex-direction: column;
}

.apl-picker-builder-root {
	flex-wrap: wrap;

	.apl-picker-builder-multi {
		padding-left: map-get($spacers, 2);
		border-left: 1px solid $border-color;
	}

	.list-picker-item-header {
		.list-picker-item-title {
			display: none !important;
		}
	}

	.list-picker-root {
		align-items: flex-start;

		&> .list-picker-new-button {
			margin: 0;
		}

		.list-picker-item-container {
			padding: 0 !important;
			border: 0 !important;
			margin-bottom: 0;
			display: flex;

			.list-picker-item-header {
				order: 1;
				margin-left: map-get($spacers, 2) !important;
				line-height: map-get($spacers, 4);
			}
		}
	}
}

.apl-action-picker-action {
	display: flex;
	flex-direction: row;
}

.hide-picker-root {
	width: unset;
	margin: 0;
}

.apl-picker-builder-root.apl-action-sequence .apl-action-condition {
	display: none;
}
.apl-picker-builder-root.apl-action-strictSequence .apl-action-condition {
	display: none;
}
.apl-action-schedule .apl-action-condition {
	display: none;
}
